Grid5

A = (4.106015184139263, 3.188651478820009)
B = (4.496626055217365, 3.3473371451954876)
d_{AB} = Distance(A, B)
θ: atan(Slope[Line[A, B]])
m = 4 (slider from 0 to 10, step 1)
n = 3 (slider from 0 to 10, step 1)
a = Segment(A, B)
GridAllAB = Sequence(Sequence[(x(A) + j * d_{AB} * cos(θ) - i * d_{AB} * sin(θ), y(A) + j * d_{AB} * sin(θ) + i * d_{AB} * cos(θ)), i, -m, m], j, -n, n)